import { Icon } from '@blueprintjs/core'
import React, { FC } from 'react'
import { useHistory } from 'react-router-dom'
import styles from './style.module.css'
interface IProps {
  title: string
  route: string
}
const LinkTitle: FC<IProps> = ({ title, route }) => {
  const history = useHistory()
  const handleClick = () => {
    history.push(route)
  }
  return (
    <div className={styles.root} onClick={handleClick}>
      {title}
      <Icon icon='chevron-right' />
    </div>
  )
}
export default LinkTitle
